package com.accp.restaurant.controller;

import com.accp.restaurant.service.OrderdishesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/orderdishes")
public class OrderdishesController {

    @Autowired
    private OrderdishesService orderdishesService;
    /**
     * 修改数量
     * @param dishesId
     * @param type
     * @param roomid
     * @return
     */
    @RequestMapping("/upMenu")
    @ResponseBody
    public boolean UpMenu(Long dishesId,String type,Long roomid){
        System.out.println(dishesId+"--"+type+"--"+roomid);
        return orderdishesService.UpdateOrderdishes(dishesId,type,roomid)!=null?true:false;
    }
}
